#pragma once

#include <mutex>
class CHttpPackage
{
public:
	CHttpPackage();
	~CHttpPackage();

public:
	static CHttpPackage* getInstance();
	bool init();
	int Post(const std::string & strUrl, const std::string & strData, std::string & strResponse);
	static size_t OnWriteData(void* buffer, size_t size, size_t nmemb, void* lpVoid);


private:
	static CHttpPackage*	   _M_instance;
	static std::mutex		   _M_mutex;
};

#define g_httpPackage CHttpPackage::getInstance()